#include <QObject>
#include <QtQml>

class QmlType : public QObject
{
    Q_OBJECT
    Q_PROPERTY(int value READ getValue WRITE setValue NOTIFY valueChanged)
    Q_PROPERTY(QString name READ getName WRITE setName NOTIFY nameChanged)

public:
    explicit QmlType(QObject *parent = nullptr);
        ~QmlType();

public slots:
    int getValue() const;
    void setValue(int value);
    QString getName() const;
    void setName(const QString &name);

signals:
    void valueChanged();
    void nameChanged();

private:
    int m_value;
    QString m_name;
};